import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import globalComponent from './plugins/globalComponent';
import './permission';
import * as elementPlus from './plugins/elementPlus';
import '@/assets/css/index.scss';
import 'nprogress/nprogress.css';
// 临时方案，最后抽取组件库中
import Vant from 'vant';
import 'vant/lib/index.css';
const app = createApp(App);
app.use(store);
app.use(router);
app.use(globalComponent);
app.use(Vant);

/**
 * elementPlus
 * 挂载全局组件、插件
 */
elementPlus.components.forEach((component) => {
	app.component(component.name, component);
});
elementPlus.plugins.forEach((plugin) => {
	app.use(plugin);
});

app.mount('#app');
